revision:
The property returns the owner document of a node, as a Document object. In HTML, the HTML document itself is always the ownerDocument of an element.
Syntax:
node.ownerDocument : the owner document of the node, as a Document object
property value:
none :
example
Click the button get the node type of the owner document of this <p> element.
<div> <p id="par9">Click the button get the node type of the owner document of this <p> element.</p> <button onclick="firstFunction()">Try it</button> <p id="prop"></p> </div> <script> function firstFunction() { var x= document.getElementById("par").ownerDocument.nodeType; document.getElementById("prop").innerHTML = "nodeType = " + x; } </script>